<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Raccoon Sell</title>

    <link href="../css/bootstrap.css" rel="stylesheet">

    <link href="../css/small-business.css" rel="stylesheet">

    <link rel="stylesheet" type="text/css" href="../css/form.css">

  </head>

  <body>

    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          
          <a class="navbar-brand logo-nav" href="../index.html"><img src="../images/logo.png"></a>
        </div>

        
        <div class="collapse navbar-collapse navbar-ex1-collapse">
              <ul class="nav navbar-nav navbar-right">
	<li style="width:100px; color:white;"><center>Usuario</center></li>
	<li style="width:100px;"><center><a href="inicioCliente.html">Principal</a></center></li>
	<li style="width:100px;"><center><a href="formBuscaEspectaculo.html">Buscar</a></center></li>
	<li style="width:100px;"><center><a href="formReserva.php">Reservar</a></center></li>
    <li style="width:100px;"><center><a href="../index.php">Salir</a></center></li>
    </ul>
        </div>
      </div>
    </nav>

    <form style="width:380px;"class='contacto' method="post" action="" name="f_contacto">
        <h1><center>Busqueda de espect&aacute;culo</center></h1><br>
        <label>Nombre de espect&aacute;culo:</label>
		<?
		include("../conexion.php");
        $sql= "Select descripcion from espectaculo"; 
        $result = mysql_query($sql);
		echo "<select size='1' name='espectaculo'>";
		while ($row = mysql_fetch_row($result))
        {
         echo "<option>";
         echo $row[0]."</option>";
        }
		?>
		</select><br><br>
		<br><br>
		<input type='submit' value='Buscar' name="buscar">
		<input type='reset' value='Borrar'>	
	</form>
		
<?php
if($buscar){
if($espectaculo=="Seleccione")
{
echo "Debe seleccionar una busqueda";
}
else
{
include("../conexion.php");
$sql= "select * from espectaculo where descripcion in($espectaculo)"; 
$result = mysql_query($sql);
if ($row = mysql_fetch_row($result))
{
echo "
<center>
<table border=1>
<td>Id Espectaculo</td>
<td>Descripcion</td>
<td>Entradas disponibles</td>
<td>Fecha</td>";
while ($row = mysql_fetch_row($result))
{
echo "<tr><td>";
echo $row[0]."</td><td>";
echo $row[1]."</td><td>";
echo $row[2]."</td><td>";
echo $row[3]."</td></tr>";
}
echo "</center></table>";
}
else
{
echo "NO SE ENCUENTRA EL REGISTRO";				  
}
}
}
?>	
    <script src="../js/jquery.js"></script>
    <script src="../js/bootstrap.js"></script>
  </body>
</html>